package com.mall.b2c.bean;

import com.mall.b2c.domain.delivery.DeliveryMethodDomain;
import com.mall.b2c.domain.intergral.ShopOrderDomain;
import com.mall.b2c.domain.intergral.ShopProductDomain;
import com.mall.b2c.enums.IntergralOrderStatus;
import com.mall.common.util.UploadUtil;

import java.util.Date;

/**
 * Created by chen on 16/12/20.
 */
public  class IntergralShopOrderBean {

    private Long id;
    private Long memberId;
    private String memberName;
    private Long productId;
    private String productName;
    private Date createDate;
    private Date sendDate;
    private String phone; //shouji
    private String address;//地址
    private String name;//收货人
    private String orderNo;//订单编号
    private String litpic;
    private String express;
    private Long storeId;

    ;//快递单号
    private String methodname;
    private IntergralOrderStatus status;
    private int num;
    private int intergral;

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public IntergralShopOrderBean() {

    }

    public IntergralShopOrderBean(ShopOrderDomain domain) {
        this.num = domain.getNum();
        this.memberId = domain.getMember().getId();
        this.memberName = domain.getMember().getName();
        this.productId = domain.getProduct().getId();
        this.productName = domain.getProduct().getName();
        this.createDate = domain.getCreateDate();
        this.sendDate = domain.getSendDate();
        this.phone = domain.getPhone();
        this.address = domain.getAddress();
        this.name = domain.getName();
        this.intergral = domain.getIntergral();
        this.express = domain.getExpress();
        this.status = domain
                .getStatus();
        if (domain.getDeliveryMethod() != null) {
            this.methodname = domain.getDeliveryMethod().getName();
        }
        this.orderNo = domain.getOrderNo();
        this.litpic = UploadUtil.replacePath(domain.getProduct().getLitpic());
    }

    public int getIntergral() {
        return intergral;
    }

    public void setIntergral(int intergral) {
        this.intergral = intergral;
    }

    public IntergralOrderStatus getStatus() {
        return status;
    }

    public void setStatus(IntergralOrderStatus status) {
        this.status = status;
    }

    public String getMethodname() {
        return methodname;
    }

    public void setMethodname(String methodname) {
        this.methodname = methodname;
    }

    public String getExpress() {
        return express;
    }

    public void setExpress(String express) {
        this.express = express;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getLitpic() {
        return litpic;
    }

    public void setLitpic(String litpic) {
        this.litpic = litpic;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
}